package eteam.aps.systeminterface.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

import javax.validation.GroupSequence;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @description : sp_custclassDto
 */
@Data
@ApiModel(value = "sp_custclass")
@GroupSequence({Insert.class, Update.class, CustclassDto.class})
public class CustclassDto implements Serializable {
    /**
     * 主键ID
     */
    @ApiModelProperty("主键ID")
    @NotBlank(message = "分类ID为空", groups = Update.class)
    public String fclassid;
    /**
     * 类别编号
     */
    @ApiModelProperty("类别编号")
    @NotBlank(message = "分类编号为空", groups = {Insert.class, Update.class})
    public String fcode;
    /**
     * 类别名称
     */
    @ApiModelProperty("类别名称")
    @NotBlank(message = "分类名称为空", groups = {Insert.class, Update.class})
    public String fname;
    /**
     * 同级序号
     */
    @ApiModelProperty("同级序号")
    @NotNull(message = "排序不合法", groups = {Insert.class, Update.class})
    public Integer forder;
    /**
     * 上级Id
     */
    @ApiModelProperty("上级Id")
    @NotBlank(message = "上级分类ID为空", groups = {Insert.class, Update.class})
    public String faboveid;
    /**
     * 备注
     */
    @ApiModelProperty("备注")
    public String fremark;
    /**
     * 状态【-1删除 0停用 1启用】
     */
    @ApiModelProperty("状态【-1删除 0停用 1启用】")
    @NotNull(message = "状态不合法", groups = {Insert.class, Update.class})
    @Max(value = 1, message = "状态不合法", groups = {Insert.class, Update.class})
    @Min(value = -1, message = "状态不合法", groups = {Insert.class, Update.class})
    public Integer state;
    /**
     * 助记码
     */
    @ApiModelProperty("助记码")
    private String fzjcode;
}
